In JavaScript, var
is function-scoped and was traditionally used to declare variables. let
and const
are block-scoped. The key difference between let
and const
is that let
allows for reassignment while const
creates a read-only reference.